package com.software.practicecenter.controller;


import com.software.practicecenter.entity.Passage;
import com.software.practicecenter.service.PassageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/passage")
public class PassageController {
    @Autowired
    private PassageService passageService;

    //查询章节
//    public List<PassageData> findAll(){
//        List<PassageData> findPassages = passageService.findAll();
//        return findPassages;
//    }
    @GetMapping("/list")
    public List<Passage> findAll(){
        List<Passage> passages = passageService.findAll();
        return passages;
    }
}
